SRCS = $(wildcard *.c)
OBJS = $(patsubst %.c,%.o,$(SRCS))

CFLAGS = -g -c -I./ -D _USE_HASH_TABLE -D _USE_MMAP -D _DEBUG
LDFLAGS = -lpthread -lm -lrt

TARGET = minihttpserver

CROSS_COMPILE = 
CC = gcc

.PHONY : all
all : $(TARGET)
$(TARGET) : $(OBJS)
	$(CROSS_COMPILE)$(CC) -o $@ $^ $(LDFLAGS)
$(OBJS) : $(SRCS)
	$(CROSS_COMPIEL)$(CC) -o $@ $(CFLAGS) $(patsubst %.o,%.c,$@)

.PHONY : clean
clean :
	rm -rf $(OBJS) $(TARGET)

